<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //navgator 对象包含有关浏览器的信息，它有很多属性，常用的时wserAgent
        //该属性可以返回由客户机发送服务器的user - agent 头部的值

        //判断终端打开页面，实现跳转

        if((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|blackBerry|IEMobile|MQQBrowser|JUC|Fennce|wOSBrowser|BrowserNG|WebOS|Symbian|WIndow Phone)/i))){
            window.location.href = ""; //手机
        }else{
            window.location.href = "";//电脑
        }
    </script>
</body>
</html>